
-define(CPU_HIGH_THRESHOLD,  60 ).
-define(CPU_MID_THRESHOLD, 40).
-define(CPU_LOW_THRESHOLD , 10).


-record(runtime,{cpu=0,mem=0,up=0,down=0,connect=0}).

%%－－－－－－－－－－－表结构－－－－－－－－－－－－－－－－－－－－－－
-record(container , {    name,
			 host="localhost" ,
			 ip,
                         port="80" ,
                         type="php" ,
                         home="/home/admin/container"  
                         %%, user="admin",
                         %%  password="admin" 
			}).
-record(app, { name , domain , source , target } ).
-record(instance, {container_name , app_name }).
-record(instance_runtime , {instance,  runtime=#runtime{} }).
%%-record(container_runtime, {name ="container1", pid =undefined,  runtime=#runtime{} }).
-record(container_runtime, {name ="container1",  runtime=#runtime{} }).
-record(app_scable_log,  { app , type,  time } ).
-record(acc_runtime, { cpu=0.0 ,  up=0 , down=0,pv=0 }).

-record(agent_state, {id =0 , pid, cpu=0, container}).

-record( httpd_proc , {  port , desc } ).


%%周期累计
-record(term_runtime, {  cpu_time=0, up=0, down=0, pv=0 }) .
-record(app_term_runtime, { app, term_runtime } ).

%%所有累积
-record(total_runtime , { cpu_time=0, up=0,down=0,pv=0 }).
-record(app_total_runtime, { app, total_runtime } ).
